package com.atguigu.yygh.hosp.controller.admin;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.model.acl.User;
import com.atguigu.yygh.vo.acl.UserQueryVo;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/admin/user")
public class UserController {


    @PostMapping(value = "/login")
    public R login(@RequestBody User user){
     //暂时不去数据库查:用户系统再去
        return R.ok().data("token","admin-token");
    }

    @GetMapping(value = "/info")
    public R info(String token){
        return R.ok().data("roles","[admin]")
                     .data("introduction","I am a super administrator")
                     .data("avatar","https://img.zcool.cn/community/01dd395f1aaf93a801215aa0e01515.gif")
                     .data("name","Super Admin");
    }


}
